package javaFeatures.src.TestFeature.oopcourse;



public class oop2 {
    private double radius;
    public void setRadius(double r){
        radius=r;
    }
    public double getRadius() {
        return radius;
    }
    public double calculateArea(){
        return Math.PI*radius*radius;
    }
    public double calculateCircumference() {
        return 2 * Math.PI * radius;
    }
    public static void main(String[] args) {
        oop2 circle = new oop2();
        circle.setRadius(666.0);

        System.out.println("圆的半径为：" + circle.getRadius());
        System.out.println("圆的面积为：" + circle.calculateArea());
        System.out.println("圆的周长为：" + circle.calculateCircumference());
    }
}
